package bean.service.impl;

import bean.domain.Account;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author peter
 * @date 2021/12/9 下午9:22
 */
@Component("accountService")
public class AccountService {

    private Account account;

    public AccountService() {
        System.out.println("AccountService 通过注解方式已经初始化");
    }

    @Autowired
    public void setAccount(Account account) {
        this.account = account;
    }

    public Account getAccount() {
        System.out.println("------> Autowired Annotation" + account);
        return account;
    }
}
